<include file="Public:pagerForm" />

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>部门：</label>
				<select name="department" class="required combox" onchange="$(this).parents('form:first').submit()">
					<volist name='Think.config.departments' id="department">
						<option value="{$key}" <?php echo $key == $_REQUEST['department'] ? 'selected' : '' ?>>{$department}</option>
					</volist>
				</select>
			</li>
			<li>
				<label>关键字：</label>
				<input type="text" name="keywords" value="{$_REQUEST['keywords']}" alt="搜索条件"/>
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="__URL__/add" target="dialog" mask="true" height="380"><span>新增</span></a></li>
			<li><a class="delete" href="__URL__/foreverdelete/id/{sid_user}/navTabId/__MODULE__" target="ajaxTodo" title="你确定要删除吗？" warn="请选择用户"><span>删除</span></a></li>
			<li><a class="edit" href="__URL__/edit/id/{sid_user}" target="dialog" mask="true" warn="请选择用户" height="380"><span>编辑</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="__URL__/password/id/{sid_user}" target="dialog" mask="true" warn="请选择用户"><span>修改密码</span></a></li>
		</ul>
	</div>

	<table class="table" width="100%" layoutH="138">
		<thead>
		<tr>
			<th width="100" orderField="account" <if condition="$_REQUEST._order eq 'account'">class="{$_REQUEST._sort}"</if>>用户名</th>
			<th orderField="nickname" <if condition="$_REQUEST._order eq 'nickname'">class="{$_REQUEST._sort}"</if>>昵称</th>
			<th orderField="email" <if condition="$_REQUEST._order eq 'email'">class="{$_REQUEST._sort}"</if>>Email</th>
			<th orderField="phone" <if condition="$_REQUEST._order eq 'phone'">class="{$_REQUEST._sort}"</if>>电话</th>
			<th orderField="qq" <if condition="$_REQUEST._order eq 'qq'">class="{$_REQUEST._sort}"</if>>QQ</th>
			<th width="100" orderField="department" <if condition="$_REQUEST._order eq 'department'">class="{$_REQUEST._sort}"</if>>部门</th>
			<th width="120" orderField="last_login_time" <if condition="$_REQUEST._order eq 'last_login_time'">class="{$_REQUEST._sort}"</if>>上次登录</th>
			<th width="80" orderField="login_count" <if condition="$_REQUEST._order eq 'login_count'">class="{$_REQUEST._sort}"</if>>登录次数</th>
			<th width="80" orderField="status" <if condition="$_REQUEST._order eq 'status'">class="{$_REQUEST._sort}"</if>>状态</th>
		</tr>
		</thead>
		<tbody>
		<volist id="vo" name="list">
			<tr target="sid_user" rel="{$vo['id']}">
				<td>{$vo['account']}</td>
				<td>{$vo['nickname']}</td>
				<td>{$vo['email']}</td>
				<td>{$vo['phone']}</td>
				<td>{$vo['qq']}</td>
				<td>{$vo['department']|C='departments.'.###}</td>
				<td>{$vo['last_login_time']|date="Y-m-d H:i:s",###}</td>
				<td>{$vo['login_count']}</td>
				<td>{$vo['status']|showStatus=$vo['id']}
					<?php if ($_SESSION['administrator']) {
					echo ' | <a href="__URL__/role/id/'.$vo['id'].'" target="dialog" mask="true" title="'.$vo['nickname'].' 授权 ">授权 </a>';
					} ?>
				</td>
			</tr>
		</volist>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
	</div>

</div>


